HTML pages typically contain graphic images. These graphic images comprise a series of colored dots, or pixels. Graphic images can be represented by matrices, with each matrix element corresponding to a pixel in the image. In many cases these pixels are typically clustered together with pixels of the same or similar color. For example, in a picture taken outdoors there may be a large number of blue colored pixels clustered together for the sky, or a large number of green colored pixels clustered together for the ground.
While graphic images are important in HTML pages, they generally take up a much greater amount of memory than typical HTML data. This fact can be observed when downloading an HTML page over a slow internet connection, for example. The graphic images are always the last part of the page to load because they are of a much larger file size than the rest of the HTML page. This can become even more apparent when “roll-over” type images are used in an HTML page. Roll-over images are typically used as buttons such that when a user places the mouse cursor over one of the buttons, the button's image changes to reflect that the cursor is over it. This results in an even larger download time, because an additional roll-over image must be downloaded for each button.
Given that images tend to have similar pixels clustered together, download times can be decreased by replacing rectangular clusters of identical pixels with HTML tables containing cells of the same color. This technique can further reduce the amount of data downloaded when used in conjunction with roll-over buttons. Since buttons often comprise a general uniform color, these portions can be replaced with HTML tables. When a user places the cursor over a button, only the parts of the roll-over button that differ from the regular button are downloaded.
While replacing rectangular portions of an image with HTML tables is useful, isolating the pixels into homogeneous rectangles suitable for HTML replacement can be difficult and very time consuming. Typically, a user manually selects portions of the image to replace with table cells. This often results in sub-optimal pixel replacement, both in terms of the number of replaced pixels, and the number of table cells used to make the replacement.
Therefore, what are needed are systems and methods for the automatic isolation of target elements in matrices, such as graphic images, into homogenous rectangular regions.